﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace Proggy.Data.Entities
{
    /// <summary>
    /// "Random data" items
    /// </summary>
    public class RandomDataItem
    {
        /// <summary>
        /// Alias / primary key
        /// </summary>
        [Key]
        [Display(Name="Unique name (6-64 chars)")]
        [Required(AllowEmptyStrings=false)]
        [MaxLength(64)]
        [MinLength(6)]
        public string RandomDataItemId { get; set; }

        /// <summary>
        /// Category eg ("tags")
        /// </summary>
        [Required(AllowEmptyStrings=false), MaxLength(64)]
        [MinLength(1)]
        [Display(Name="Category alias (1-64 chars)")]
        public string CategoryAlias { get; set; }

        /// <summary>
        /// Data item value
        /// </summary>
        [Required(AllowEmptyStrings=false), MaxLength(int.MaxValue)]
        [Display(Name="Data value (unlimited)")]
        public string Value { get; set; }

        public DateTime FirstCreated { get; set; }
        public string FirstCreatedUsername { get; set; }

        public DateTime LastUpdated { get; set; }
        public string LastUpdatedUsername { get; set; }
        
    }
}
